﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace Fabrikam.Phone.Converters
{
    public class StatusToBrushConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {

            int status = (int) value;

            if (status == 1)
                return new SolidColorBrush(Colors.Red);
            if (status == 2)
                return new SolidColorBrush(Colors.Green);
            if (status == 3)
                return new SolidColorBrush(Colors.Blue);

            return new SolidColorBrush(Colors.Blue);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
